EMT Practice Test

1. Question Content...


Question List

Question1: A developer wants to display all of the available record types for a Case object. The developer also wants to display the picklist values for the Case.Status field. The Case object and the Case Status field are on a custom visualforce page.
Which action can the developer perform to get the record types and picklist values in the controller? Choose 2 answers

Question2: A visualforce interface is created for Case Management that includes both standard and custom functionality defined in an Apex class called myControllerExtension. The visualforce page should include which <apex:page> attribute(s) to correctly implement controller functionality?

Question3: A developer needs to write a method that searches for a phone number that could be on multiple object types. Which method should the developer use to accomplish this task?

Question4: A developer needs to create a custom Visualforce button for the Opportunity object page layout that will cause a web service to be called and redirect the user to a new page when clicked. Which three attributes need to be defined in the <apex:page> tag of the Visualforce page to enable this functionality? Choose three answers.

Question5: The values 'High', 'Medium', and 'Low' are Identified as common values for multiple picklist across different object. What is an approach a developer can take to streamline maintenance of the picklist and their values, while also restricting the values to the ones mentioned above?

Question6: A developer is creating a test coverage for a class and needs to insert records to validate functionality.
Which method annotation should be used to create records for every method in the test class?

Question7: A developer has a block of code that omits any statements that indicate whether the code block should execute with or without sharing. What will automatically obey the organization-wide defaults and sharing settings for the user who executes the code in the Salesforce organization?

Question8: Given:
Map<ID, Account> accountMap = new Map>ID, Account> ([SELECT Id, Name FROM Account]); What are three valid Apex loop structures for iterating through items in the collection? (Choose three.)

Question9: Which declarative process automation feature supports iterating over multiple records?

Question10: Application Events follow the traditional publish-subscribe model. Which method is used to fire an event?

Question11: A Lightning component has a wired property, searchResults, that stores a list of Opportunities.
Which definition of the Apex method, to which the searchResultsproperty is wired, should be used?

Question12: In the code below, which type does String inherit from? String s = 'Hello World';

Question13: A developer wants to import 500 Opportunity records into a sandbox.
Why should the developer choose to use Data Loader instead of Data Import Wizard?

Question14: A developer has the following trigger that fires after insert and creates a child Case whenever a new Case is created. List<Case> childCases = new List<Case>();for (Case parent : Trigger.new){Case child = new Case (ParentId = parent.Id, Subject = parent.Subject);childCases.add(child);}insert childCases; What happens after the code block executes?

Question15: What is the result of the debug statements in testMethod3 when you create test data using testSetup in below code?

Question16: Which requirement needs to be implemented by using standard workflow instead of Process Builder? Choose 2 answers

Question17: A change set deployment from a sandbox to production fails due to a failure in a managed package unit test.
The developer spoke with the manager package owner and they determined it is a false positive and can be ignored. What should the developer do to successfully deploy?

Question18: A developer created a Visualforce page with a custom controller to show a list of accounts. The page uses the <apex:SelecList> component, with a variable called "selection", to show the valid values for Account.Type. The page uses an <apex:pageBlockTable> component to display the list of accounts, where the iteration variable is "acct". The developer wants to ensure that when a user selects a type on the <apex : selectList> component, only accounts with that type are shown on the page. What should the developer do to accomplish this?

Question19: What are two characteristics of partial copy sandboxes versus full sandboxes? Choose 2 answers

Question20: What declarative method helps ensure quality data? Choose 3 answers

Question21: In terms of the MVC paradigm, what are two advantages of implementing the layer of a Salesforce application using Aura Component-based development over Visualforce? Choose 2 answers

Question22: What is the maximum number of SOQL queries used by the following code? List<Account> aList =
[SELECT Id FROM Account LIMIT 5]; for (Account a : aList){ List<Contact> cList = [SELECT Id FROM Contact WHERE AccountId = :a.Id); }

Question23: A developer needs to confirm that an Account trigger is working correctly without changing the organization's data.What would the developer do to test the Account trigger?

Question24: What is a benefit of the Lightning Component framework?Choose 3 answers

Question25: A developer created a Visualforce page and custom controller to display the account type field as shown below. Custom controller code: public class customCtrlr{ private Account theAccount; public String actType; public customCtrlr() { theAccount = [SELECT Id, Type FROM Account WHERE Id = :apexPages.currentPage().getParameters().get('id')]; actType = theAccount.Type;
} } Visualforce page snippet: The Account Type is {!actType} The value of the account type field is not being displayed correctly on the page. Assuming the custom controller is property referenced on the Visualforce page, what should the developer do to correct the problem?

Question26: Which three statements are true regarding trace flags? (Choose three.)

Question27: A developer creates an Apex class that includes private methods. What can the developer do to ensure that the private methods can be accessed by the test class?

Question28: A developer is creating a Visualforce page that allows users to create multiple Opportunities. The developer is asked to verify the current user's default Opportunity record type, and set certain default values based on the record type before inserting the record. How can the developer find the current user's default record type?

Question29: Which statement is true about developing in a multi-tenant environment?

Question30: A Visualforce page is required for displaying and editing Case records that includes both standard and custom functionality defined in an Apex class called myControllerExtension.
The Visualforce page should include which <apex:page> attribute(s) to correctly implement controller functionality?

Question31: A Visual force page displays two fields named Phone Number and Email.User1 has access to Phone Number, but not to Email.User2 has access to Email, but not Phone NumberA developer needs to ensure that User1 can only see Phone Number, and User2 can only see Email.Which method can the developer use to achieve this?

Question32: Universal Containers wants a list button to display a Visualforce page that allows users to edit multiple records.
Which Visualforce feature supports this requirement?

Question33: Which statement should a developer avoid using inside procedural loops? (Choose 2)

Question34: A developer writes the following code:

What is the result of the debug statement?

Question35: Which exception type cannot be caught?

Question36: A developer writes a before insert trigger.How can the developer access the incoming records in the trigger body?

Question37: What is the result of the debug statements in testMethod3 when you create test data using testSetup in below code?

Question38: A developer needs to update an unrelated object when a record gets saved.
Which two trigger types should the developer create? (Choose two.)

Question39: Given the code below, which three statements can be used to create the controller variable? Public class accountlistcontroller{ public list<account>getaccounts(){ return controller.getrecords(); } } Choose 3 answers

Question40: What is the impact of declaring an Apex class using the "without sharing" keywords?

Question41: A Visual Flow uses an apex Action to provide additional information about multiple Contacts, stored in a custom class, contactInfo. Which is the correct definition of the Apex method that gets additional information?

Question42: A developer is creating an application to track engines and their parts. An individual part can be used in different types of engines.What data model should be used to track the data and to prevent orphan records?

Question43: A developer must troubleshoot to pinpoint the causes of performance issues when a custom page loads in their org. Which tool should the developer use to troubleshoot?

Question44: A team of developers is working on a source-driven project that allows them to work independently, with many different org configurations. Which type of Salesforce orgs should they use for their development?

Question45: Before putting an app into production, which step should be taken?

Question46: Given the code below, which three statements can be used to create the controller variable? Public class accountlistcontroller{ public list<account>getaccounts(){ return controller.getrecords(); } } Choose 3 answers

Question47: The sales team at Universal Containers would like to see a visual indicator appear on both Account and Opportunity page layouts to alert salespeople when an Account is late making payments or has entered the collections process.
What can a developer implement to achieve this requirement without having to write custom code?

Question48: A developer considers the following snippet of code:

Based on this code, what is the value of x?

Question49: A developer creates a custom controller and custom Visualforce page by using the following code block:public class myController {public String myString;public String getMyString() {return 'getmyString';}public String getStringMethod1() {return myString;}public String getStringMethod2() {if (myString == null)myString = 'Method2';return myString;}}{!myString}, {!StringMethod1}, {!StringMethod2}, {!myString}What does the user see when accessing the custom page?

Question50: A development team wants to use a deployment script to automatically deploy to a sandbox during their development cycles. Which tool should they use to deploy to the sandbox?

Question51: The sales management team requires that the lead source field of the Lead record be populated when Lead is converted. What would a developer use to ensure that a user populates the Lead source field?

Question52: What is accurate statement about with sharing keyword? Choose 2 answers

Question53: Cloud Kicks Fitness, an ISV Salesforce partner, is developing a managed package application. One of the application modules allows the user to calculate body fat using the Apex class, BodyFat, and its method, calculateBodyFat(). The product owner wants to ensure this method is accessible by the consumer of the application when developing customizations outside the ISV's package namespace.
Which approach should a developer take to ensure calculateBodyFat()is accessible outside the package namespace?

Question54: Which two platform features allow for the use of unsupported languages? Choose 2 answers

Question55: What is a capability of a StandardSetController?Choose 2 answers

Question56: A developer creates a method in an Apex class and needs to ensure that errors are handled properly.What would the developer use? (There are three correct answers.)

Question57: A developer has the following code:try {List nameList;Account a;String s = a.Name;nameList.add(s);} catch (ListException le ) {System.debug(' List Exception ');} catch (NullPointerException npe) {System.debug(' NullPointer Exception ');} catch (Exception e) {System.debug(' Generic Exception ');} What message will be logged?

Question58: A developer is creating an enhancement to an application that will allow people to be related to their employer. Which data model provides the simplest solution to meet the requirements?

Question59: Which governor limit applies to all the code in an apex transaction?

Question60: What is a capability of cross-object formula fields? Choose 3 answers

Question61: Which option would a developer use to display the Accounts created in the current week and the number of related Contacts using a debug statement in Apex?

Question62: Which statement should a developer avoid using inside procedural loops? (Choose 2)

Question63: A developer has a Visualforce page and custom controller to save Account records. The developer wants to display any validation rule violations to the user.
How can the developer make sure that validation rule violations are displayed?

Question64: A platform developer at Universal Containers needs to create a custom button for the Account object that, when clicked, will perform a series of calculations and redirect the user to a custom Visualforce page.
Which three attributes need to be defined with values in the <apex:page> tag to accomplish this? (Choose three.)

Question65: A lead object has a custom field Prior_Email__c. The following trigger is intended to copy the current Email into the Prior_Email__c field any time the Email field is changed:

Which type of exception will this trigger cause?

Question66: Which option should a developer use to create 500 Accounts and make sure that duplicates are not created for existing Account Sites?

Question67: Which three options can be accomplished with formula fields? (Choose three.)

Question68: What is a capability of formula fields? (Choose 3)

Question69: How many accounts will be inserted by the following block ofcode? for(Integer i = 0 ; i < 500; i++) { Account a = new Account(Name='New Account ' + i); insert a; }

Question70: What should a developer use to implement an automate approval process submission for case?

Question71: A developer declared a class as follow.
public class wysiwyg { // Properties and methods including DML }
Which invocation of a class method will obey the organization-wide defaults and sharing settings for the running user in the Salesforce Organization?

Question72: Universal Containers stores Orders and Line Items in Salesforce. For security reasons, financial representatives are allowed to see information on the Order such as order amount, but they are not allowed to see the Line Items on the Order.
Which type of relationship should be used?

Question73: Which declarative method helps ensure quality data? (Choose 3)

Question74: A company has a custom object named Region. Each account in salesforce can only be related to one region at a time, but this relationship is optional. Which type of relantionship should a developer use to relate an account to a region?

Question75: The Sales Management team hires a new intern. The intern is not allowed to view Opportunities, but needs to see the Most Recent Closed Date of all child Opportunities when viewing an Account record.
What would a
developer do to meet this requirement?

Question76: On a Visualforce page with a custom controller, how should a developer retrieve a record by using an ID that is passed on the URL?

Question77: Which standard field needs to be populated when a developer inserts new Contact records programmatically?

Question78: A developer writes the following code:

What is the result of the debug statement?

Question79: A developer must create a ShippingCalculator class that cannot be instantiated and must include a working default implementation of a calculate method, that sub-classes can override.
What is the correct implementation of the ShippingCalculator class?

Question80: Application Events follow the traditional publish-subscribe model.
Which method is used to fire an event?

Question81: A Licensed_Professional__c custom object exist in the system with two Master-Detail fields for the following objects: Certification__c and Contact. Users with the "Certification Representative" role can access the Certification records they own and view the related Licensed Professionals records, however users with the "Salesforce representative" role report they cannot view any Licensed professional records even though they own the associated Contact record. What are two likely causes of users in the
"Sales Representative" role not being able to access the Licensed Professional records? Choose 2 answers

Question82: A developer has an integer variable called maxAttempts. The developer meeds to ensure that once maxAttempts is initialized, it preserves its value for the lenght of the Apex transaction; while being able to share the variable's state between trigger executions. How should the developer declare maxAttempts to meet these requirements?

Question83: The Review_c object has a lookup relationship up to the Job_Application_c object. The Job_Application_c object has a master-detail relationship up to the Position_c object. The relationship field names are based on the auto-populated defaults.
What is the recommended way to display field data from the related Position_c record on a Visualforce page for a single Review_c record?

Question84: Universal Container(UC) wants to lower its shipping cost while making the shipping process more efficient. The Distribution Officer advises UC to implement global addresses to allow multiple Accounts to share a default pickup address. The Developer is tasked to create the supporting object and relationship for this business requirement and uses the Setup Menu to create a custom object called
"Global Address". Which field should the developer ad to create the most efficient model that supports the business need?

Question85: Which code should be used to update an existing Visualforce page that uses standard Visualforce components so that the page matches the look and feel of Lightning Experience?

Question86: What are two features of Heroku Connect? Choose 2 answers

Question87: What is a benefit of using a trigger framework?

Question88: An Apex transaction inserts 100 Account records and 2,000 Contact records before encountering a DML exception when attempting to insert 500 Opportunity records. The Account records are inserted by calling the database.insert() method with the allOrNone argument set to false. The Contact and Opportunity records are inserted using the standalone insert statement. How many total records will be committed to the database in this transaction?

Question89: A developer wants to list all of the Tasks for each Account on the Account detail page. When a task is created for a Contact, what does the developer need to do to display the Task on the related Account record?

Question90: Which two components are available to deploy using the Metadata API? (Choose two.)

Question91: Which statement would a developer use when creating test data for products and pricebooks?

Question92: Which two sosl searches will return records matching search criteria contained in any of the searchable text fields on an object? choose 2 answers

Question93: What must the Controller for a Visulforce page utilized to override the standard Opportunity view button?

Question94: Which two operations can be performed using a formula field? Choose 2 answers

Question95: What should a developer use to implement an automatic Approval Process submission for Cases?

Question96: A developer has the following class and trigger code public class insurancerates{ public static final decimal smokercharge = 0.01; } trigger contacttrigger on contact (before insert){ insurancerates rates = new insurancerates(); decimal basecost=xxx; } Which code segment should a developer insert at the xxx to set the basecost variable to the value of the class variable smokercharge?

Question97: A developer needs to create records for the object Property__c. The developer creates the following code block:List propertiesToCreate = helperClass.createProperties();try { // line 3 } catch (Exception exp ) { //exception handling }Which line of code would the developer insert at line 3 to ensure that at least some records are created, even if a few records have errors and fail to be created?

Question98: What should a developer working in a sandbox use to exercise a new test Class before the developer deploys that test production?Choose 2 answers

Question99: A developer needs to create a custom visualforce button for the opportunity object page layout that will cause a web service to be called and redirect the user to a new page when clicked. Which three attributes need to be defined in the <apx:page> tag of the visualforce page to enable this functionality?

Question100: A developer executes the following query in Apex to retrieve a list of contacts for each account:
List<account> accounts = [Select ID, Name, (Select ID, Name from Contacts) from Account] ; Which two exceptions may occur when it executes? (Choose two.)

Question101: A developer has the controller class below.

Which code block will run successfully in an execute anonymous window?

Question102: Which resource can be included in a Lightning Component bundle? Choose 2 answers

Question103: Which statement results in an Apex compiler error?

Question104: A developer is asked to write negative tests as part of the unit testing for a method that calculates a person's age based on birth date. What should the negative tests include?

Question105: What is the order of operations when a record is saved in Salesforce?

Question106: Which user can edit a record after it has been locked for approval? (Choose 2)

Question107: A lead object has a custom field Prior_Email__c. The following trigger is intended to copy the current Email into the Prior_Email__c field any time the Email field is changed:

Which type of exception will this trigger cause?

Question108: A developer uses a before insert trigger on the Lead object to fetch the Territory__c object, where the Territory__c.PostalCode__c matches the Lead.PostalCode. The code fails when the developer uses the Apex Data Loader to insert 10,000 Lead records. The developer has the following code block: Line-01: for (Lead l : Trigger.new){Line-02: if (l.PostalCode != null) {Line-03: List<Territory__c> terrList = [SELECT Id FROM Territory__c WHERE PostalCode__c = :l.PostalCode];Line-04: if(terrList.size() > 0) Line-05:
l.Territory__c = terrList[0].Id; Line-06: }Line-07: }Which line of code is causing the code block to fail?

Question109: A developer has the controller class below.

Which code block will run successfully in an execute anonymous window?
myFooController m = new myFooController();

Question110: How are debug levels adjusted In the Developer Console?

Question111: A developer encounters APEX heap limit errors in a trigger.
Which two methods should the developer use to avoid this error? (Choose two.)

Question112: What is the result of the debug statements in testMethod3 when you create test data using testSetup in below code?

Question113: How many level of child records can be returned in a single SOQL query from one parent object

Question114: In a single record, a user selects multiple values from a multi-select picklist. How are the selected values represented in Apex?

Question115: Which actions can a developer perform using the Schema Builder?Choose 2 answers

Question116: A Visual Flow uses an Apex Action to provide additional information about multiple Contacts, stored in a custom class, ContactInfo.
Which is the correct definition of the Apex method that gets the additional information?
@InvocableMethod(label='Additional Info')

Question117: Which two are best practices when it comes to component and application event handling? Choose 2 answers

Question118: An org has different Apex Classes that provide Account -related functionality.After a new validation rule is added to the object, many of the test methods fail.What can be done to resolve the failures and reduce the number of code changes needed for future validation rules?Choose 2 answers:

Question119: Universal Containers requires Service Representatives to update all Cases at least one every three days.
To make sure of this policy is obeyed, a developer has been asked to implement a field that displays the number of days since the last Case update. What should the developer use to configure the solution?

Question120: A platform developer needs to implement a declarative solution that will display the most recent closed won date for all opportunity records associated with an account. Which field is required to achieve this declaratively?

Question121: How should a developer prevent a recursive trigger?

Question122: A developer has the controller class below.

Which code block will run successfully in an execute anonymous window?
myFooController m = new myFooController();

Question123: The account object has a custom percent field, rating, defined with a length of 2 with 0 decimal places. An account record has the value of 50% in its rating field and is processed in the apex code below after being retrieved from the database with SOQL public void processaccount(){ decimal acctscore = acc.rating__c *
100; } what is the value of acctscore after this code executes?

Question124: An Account trigger updates all related Contacts and Cases each time an Account is saved using the following two DML statements:
update allContacts;
update allCases;
What is the result if the Case update exceeds the governor limit for maximum number of DML records?

Question125: Which two operations can be performed using a formula field? (Choose two.)

Question126: Which approach should a developer take to automatically add a "Maintenance Plan" to each Opportunity that includes an "Annual Subscription" when an opportunity is closed?

Question127: Which code block returns the ListView of an Account object using the following debug statement? system.debug(controller.getListViewOptions() );

Question128: A developer is notified that a text field is being automatically populated with invalid values.however, this should be prevented by a custom validation rule that is in placewhat could be causing this?

Question129: Potential home buyers working with a real estate company can make offers on multiple properties that are listed with the real estate company. Offer amounts can be modified; however, the property that has the offer cannot be modified after the offer is placed. What should be done to associate offers with properties in the schema for the organization?

Question130: Which two statements are true about using the @testSetup annotation in an Apex test class? (Choose two.)

Question131: Which two combined methods should a developer use to prevent more than one open Opportunity on each Account? Choose 2 answers

Question132: A developer creates a custom controller and custom Visualforce page by using the following code block:public class myController {public String myString;public String getMyString() {return
'getmyString';}public String getStringMethod1() {return myString;}public String getStringMethod2() {if (myString == null)myString = 'Method2';return myString;}}{!myString}, {!StringMethod1},
{!StringMethod2}, {!myString}What does the user see
when accessing the custom page?

Question133: A developer creates a custom controller and custom Visualforce page by using the following code block:public class myController {public String myString;public String getMyString() {return 'getmyString';}public String getStringMethod1() {return myString;}public String getStringMethod2() {if (myString == null)myString =
'Method2';return myString;}}{!myString}, {!StringMethod1}, {!StringMethod2}, {!myString}What does the user see when accessing the custom page?

Question134: A developer wants to handle the click event for a lightning:button component. The on click attribute for the component references a JavaScript function in which resource in the component bundle?

Question135: What are two uses for External IDs? (Choose two.)

Question136: When creating a record with a Quick Action, what is the easiest way to post a feed item?

Question137: What are two ways for a developer to execute tests in an org? (Choose two.)

Question138: A developer can use the debug log to see which three types of information? Choose 3 answers

Question139: A company would like to send an offer letter to a candidate, have the candidate sign it electronically, and then send the letter back.What can a developer do to accomplish this?

Question140: A developer needs to create records for the object Property__c. The developer creates the following code block:List propertiesToCreate = helperClass.createProperties();try { // line 3 } catch (Exception exp ) {
//exception
handling }Which line of code would the developer insert at line 3 to ensure that at least some records are created, even if a few records have errors and fail to be created?

Question141: A developer runs the following anonymous code block in a Salesforce org with 100 accounts List acc= {select id from account limit 10}; delete acc; database.emptyrecyclebin(acc); system.debug(limits.getlimitqueries()+'
,'+Limits.getlimitDMLStatements()); What is the debug output?

Question142: Which two statements can a developer use to throw a custom exception of type MissingFieldValueException? Choose 2 answers.

Question143: A developer is debugging the following code to determine why Accounts are not being created.
Account a = new Account(Name = 'A');
Database.insert(a, false);
How should the code be altered to help debug the issue?

Question144: A developer must provide a custom user interface when users edit a Contact. Users must be able to use the interface in Salesforce Classic and Lightning Experience.
What should the developer do to provide the custom user interface?

Question145: Given the following Apex statement:
Account myAccount = [SELECT Id, Name FROM Account];
What occurs when more than one Account is returned by the SOQL query?

Question146: A developer wants to display all of the picklist entries for the Opportunity StageName field and all of the available record types for the Opportunity object on a Visualforce page. Which two actions should the developer perform to get the available picklist values and record types in the controller? Choose 2 answers.

Question147: To which primitive data type is a text area (rich) field automatically assigned?

Question148: Which three statements are true regarding cross-object formulas? Choose 3 answers

Question149: How can a developer get all of the available record types for the current user on the case object?

Question150: Which code block returns the ListView of an Account object using the following debug statement?
system.debug(controller.getListViewOptions() );

Question151: A developer wants to display all of the picklist entries for the Opportunity StageName field and all of the available record types for the Opportunity object on a Visualforce page. Which two actions should the developer perform to get the available picklist values and record types in the controller? Choose 2 answers.

Question152: What is a benefit of developing applications in a multi-tenant environment?

Question153: Which three process automations can immediately send an email notification to the owner of an Opportunity when its Amount is changed to be greater than $10,000? (Choose three.)

Question154: A developer has the following class and trigger code:
public class InsuranceRates { public static final Decimal smokerCharge = 0.01; } trigger ContactTrigger on Contact (before insert) { InsuranceRates rates = new InsuranceRates(); Decimal baseCost = XXX; } Which code segment should a developer insert at the XXX to set the baseCost variable to the value of the class variable smokerCharge?

Question155: A developer must implement a CheckPaymentProcessorclass that provides check processing payment capabilities that adhere to what is defined for payments in the PaymentProcessorinterface.
public interface PaymentProcessor {
void pay(Decimal amount);
}
Which is the correct implementation to use the PaymentProcessorinterface class?
public class CheckPaymentProcessor implements PaymentProcessor {

Question156: What is the requirement for a class to be used as a custom Visualforce controller?

Question157: A developer needs to include a Visualforce page in the detail section of a page layout for the Account object, but does not see the page as an available option in the Page Layout Editor.
Which attribute must the developer include in the <apex:page> tag to ensure the Visualforce page can be embedded in a page layout?

Question158: Which aspect of Apex programming is limited due to multitenancy?

Question159: A lead object has a custom field Prior_Email__c. The following trigger is intended to copy the current Email into the Prior_Email__c field any time the Email field is changed:

Which type of exception will this trigger cause?

Question160: When the value of a field of an account record is updated, which method will update the value of a custom field opportunity? Choose 2 answers.

Question161: How should a custom user interface be provided when a user edits an Account in Lightning Experience?

Question162: The initial value for a number field on a record is 1. A user updated the value of the number field to 10. This action invokes a workflow field update, which changes the value of the number field to 11. After the workflow field update, an update trigger fires.What is the value of the number field of the object that is obtained from Trigger.old?

Question163: For which example task should a developer use a trigger rather than a workflow rule?

Question164: A developer creates a new Visualforce page and Apex extension, and writes test classes that exercise
95% coverage of the new Apex extension.Change set deployment to production fails with the test coverage warning: "Average test coverage across all Apex classes and triggers is 74%, at least 75% test coverage is required."What can the developer do to successfully deploy the new Visualforce page and extension?

Question165: What is an accurate constructor for a custom controller named "MyController"?

Question166: Which Salesforce feature allows a developer to see when a user last logged in to Salesforce if real-time notification is not required?

Question167: What are the eight officially supported languages on Heroku platform?

Question168: A developer wants to import 500 Opportunity records into a sandbox. Why should the developer choose to use data Loader instead of Data Import Wizard?

Question169: What can used to delete components from production?

Question170: Which two statements are acceptable for a developer to use inside procedural loops?

Question171: A developer wants to invoke an outbound message when a record meets a specific criteria.
Which three features satisfy this use case? (Choose three.)

Question172: Developer needs to automatically populate the Reports To field in a Contact record based on the values of the related Account and Department fields in the Contact record. Which type of trigger would the developer create? Choose 2 answers

Question173: Which message is logged by the code below?

Question174: A developer uses a Test Setup method to create an Account named 'Test'. The first test method deletes the Account record. What must be done in the second test method to use the Account?

Question175: A developer creates a Workflow Rule declaratively that updates a field on an object. An Apex update trigger exists for that object. What happens when a user updates a record?

Question176: A change set deployment from a sandbox to production fails due to a failure in a managed package unit test. The developer spoke with the manager package owner and they determined it is a false positive and can be ignored. What should the developer do to successfully deploy?

Question177: What is the debug output of the following Apex code?
Decimal theValue;
System.debug (theValue);

Question178: A Developer wants to get access to the standard price book in the org while writing a test class that covers an OpportunityLineItem trigger.
Which method allows access to the price book?

Question179: When the number of record in a recordset is unknown, which control statement should a developer use to implement a set of code that executes for every record in the recordset, without performing a .size() or
.length() method call?

Question180: When a Task is created for a Contact, how can a developer prevent the task from being included on the Activity Timeline of the Contact's Account record?

Question181: Given:

Question182: A developer writes the following code:

What is the result of the debug statement?

Question183: A company wants to create an employee rating program that allows employees to rate each other. An employee's average rating must be displayed on the employee record. Employees must be able to create rating records, but are not allowed to create employee records. Which two actions should a developer take to accomplish this task? choose 2 answers

Question184: Opportunity opp=[select id ,stagename from opportunity limit 1] Given the code above, how can a developer get the label for the stagename field?

Question185: Which statement about change set deployments is accurate? (Choose 3)

Question186: A developer in a Salesforce org with 100 Accounts executes the following code using the Developer console:Account myAccount = new Account(Name = 'MyAccount');Insert myAccount;For (Integer x = 0; x <
150; x++)
{Account newAccount = new Account (Name='MyAccount' + x);try {Insert newAccount;} catch (Exception ex) {System.debug (ex) ;}}insert new Account (Name='myAccount');How many accounts are in the org after this code is run?

Question187: A developer must create a Lightning component that allows users to input Contact record information to create a Contact record, including a Salary__ccustom field.
What should the developer use, along with a lightning-record-edit-form, so that Salary__cfield functions as a currency input and is only viewable and editable by users that have the correct field level permissions on Salary__c?

Question188: A developer has the controller class below.

Which code block will run successfully in an execute anonymous window?

Question189: In Lightning component framework, which resource can be used to fire events? Choose 2 answers.